<?php
namespace api\common\model;
use think\Db;
class Region extends \think\Model 
{
    protected $autoWriteTimestamp = true;
    protected $table = 'region';

    /**
     * 区域列表
     */
    public function regionList(){
        $field = array('id','regionName');
        $res = Db::name($this->table)->field($field)->select();
        return $res;
    } 

    /**
     * 根据区域id获取区域信息
     */
    public function regionInfoById($id){
        $res = Db::name($this->table)->find($id);
        return $res;
    }
}
